package com.nny.alarm.menu;

import com.nny.alarm.R;
import com.nny.alarm.widget.ActionBar;
import com.umeng.analytics.MobclickAgent;
import com.uxwine.cmm.BaseActivity;

import android.graphics.Paint;
import android.os.Bundle;
import android.text.Html;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class AboutActivity extends BaseActivity implements ActionBar.OnActionListener, View.OnClickListener
{
	Button mbtnShowMain;
	ActionBar mBar;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		mBar = (ActionBar)findViewById(R.id.about_title);
		
		initTextView();
		mBar.setOnActionListener(this);
	}

	void initTextView()
	{
		TextView tv = (TextView)findViewById(R.id.about_tv_1);
		tv.setText(Html.fromHtml(getString(R.string.about_tv_title)));

		tv = (TextView)findViewById(R.id.about_tv_2);
		tv.setText(Html.fromHtml(getString(R.string.about_tv_subtitle)));

		tv = (TextView)findViewById(R.id.about_tv_7_1);
		tv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线
		tv.setOnClickListener(this);
		
	}
	
	@Override
	public void onClick(View v)
	{
		if (v.getId() == R.id.about_tv_7_1)
		{	
			MainMenuAction.share(this);
			MobclickAgent.onEvent(this, "share", "activty_about");
		}
	}
	
	@Override
	public void onAction(ActionBar bar, View v, int action)
	{
		if(action == ActionBar.ACTION_BACK)
		{
			finish();
		}
	}
}
